
import { SETWEATHER } from './actionType'

const defaultState = {
    weather:{}
}

export default (state = defaultState,action) => {
    if(action.type === SETWEATHER){
        const newState = JSON.parse(JSON.stringify(state))
        newState.weather = action.weather
        return newState
    }
    return state;
}
